﻿namespace System.Data.Entity.Infrastructure.Annotations
{
    using System.Diagnostics;

    /// <summary>
    /// Instances of this class are used as custom annotations for representing database full-text indexes in an
    /// Entity Framework model.
    /// </summary>
    public static class FullTextIndexAnnotation
    {
        /// <summary>
        /// The name used when this annotation is stored in Entity Framework metadata or serialized into
        /// an SSDL/EDMX file.
        /// </summary>
        public const string AnnotationName = "FullTextIndexAnnotation";
        // public const string AnnotationName = "FullTextIndex"; !DON'T DO THAT!

        static FullTextIndexAnnotation()
        {
            Debug.Assert(
                AnnotationName != IndexAnnotation.AnnotationName,
                @"
                La méthode (EF6) System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.GetAnnotations(MetadataItem item)
                impose que le nom des annotations ne doit pas se terminer par la valeur du champ
                System.Data.Entity.Infrastructure.Annotations.IndexAnnotation.AnnotationName, soit 'Index'.");
        }
    }
}
